<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Person
 *
 * @ORM\Table(name="person")
 * @ORM\Entity(repositoryClass="AppBundle\Repository\PersonRepository")
 */
class Person
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\OneToMany(targetEntity="Note", mappedBy="person")
     **/
    private $person_records;

    /**
     * @ORM\OneToMany(targetEntity="Note", mappedBy="linked_person")
     **/
    private $linked_person_records;


    /**
     * @ORM\Column(name="entry_date",type="string",nullable=true ,length=45 , options={"comment"="进入日期"})
     */
    private $entry_date;

    /**
     * @ORM\Column(name="expiry_date",type="string",nullable=true ,length=45 , options={"comment"="到期日"})
     */
    private $expiry_date;

    /**
     * @ORM\Column(name="author_name",type="string", length=45,nullable=true ,options={"comment"="作者姓名"})
     */
    private $author_name;

    /**
     * @ORM\Column(name="author_email",type="string", length=45,nullable=true ,options={"comment"="作者邮箱"})
     */
    private $author_email;

    /**
     * @ORM\Column(name="author_phone",type="string", length=45,nullable=true ,options={"comment"="作者电话"})
     */
    private $author_phone;

//    /**
//     * @ORM\Column(name="source_name",type="string", length=45,nullable=true ,options={"comment"="源名称"})
//     */
//    private $source_name;

//    /**
//     * @ORM\Column(name="source_date",type="datetime",nullable=false ,options={"comment"="源日期"})
//     */
//    private $source_date;
//
//    /**
//     * @ORM\Column(name="source_url",type="string", length=100, nullable=true ,options={"comment"="源URL"})
//     */
//    private $source_url;

    /**
     * @ORM\Column(name="full_name",type="string", length=45, nullable=false ,options={"comment"="全名"})
     */
    private $full_name;

    /**
     * @ORM\Column(name="given_name",type="string", length=20,nullable=true ,options={"comment"="给定名称"})
     */
    private $given_name;

    /**
     * @ORM\Column(name="family_name",type="string", length=20,nullable=true ,options={"comment"="姓"})
     */
    private $family_name;

    /**
     * @ORM\Column(name="alternate_names",type="string", length=45,nullable=true ,options={"comment"="别名"})
     */
    private $alternate_names;

    /**
     * @ORM\Column(name="description",type="text",nullable=true ,options={"comment"="描述"})
     */
    private $description;

    /**
     * @ORM\Column(name="sex",type="string", length=10,nullable=true ,options={"comment"="性别"})
     */
    private $sex;

    /**
     * @ORM\Column(name="date_of_birth",type="string",length=45,nullable=true ,options={"comment"="出生日期"})
     */
    private $date_of_birth;

    /**
     * @ORM\Column(name="age",type="smallint",nullable=true ,options={"comment"="年龄"})
     */
    private $age;

    /**
     * @ORM\Column(name="home_street",type="string", length=45,nullable=true ,options={"comment"="家庭街道"})
     */
    private $home_street;

    /**
     * @ORM\Column(name="home_neighborhood",type="string", length=45,nullable=true ,options={"comment"="家居社区"})
     */
    private $home_neighborhood;

    /**
     * @ORM\Column(name="home_city",type="string", length=45,nullable=true ,options={"comment"="家居城市"})
     */
    private $home_city;

    /**
     * @ORM\Column(name="home_state",type="string", length=45,nullable=true ,options={"comment"="家庭状态"})
     */
    private $home_state;

    /**
     * @ORM\Column(name="home_postal_code",type="string", length=45,nullable=true ,options={"comment"="邮政编码"})
     */
    private $home_postal_code;

    /**
     * @ORM\Column(name="home_country",type="string", length=45,nullable=true ,options={"comment"="祖国"})
     */
    private $home_country;

    /**
     * @ORM\Column(name="photo_url",type="string", length=100,nullable=true ,options={"comment"="照片URL"})
     */
    private $photo_url;

    /**
     * @ORM\Column(name="profile_urls",type="string", length=100,nullable=true ,options={"comment"="个人资料URL"})
     */
    private $profile_urls;


    /**
     * Get id
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set entryDate
     *
     * @param \DateTime $entryDate
     *
     * @return Person
     */
    public function setEntryDate($entryDate)
    {
        $this->entry_date = $entryDate;

        return $this;
    }

    /**
     * Get entryDate
     *
     * @return \DateTime
     */
    public function getEntryDate()
    {
        return $this->entry_date;
    }

    /**
     * Set expiryDate
     *
     * @param \DateTime $expiryDate
     *
     * @return Person
     */
    public function setExpiryDate($expiryDate)
    {
        $this->expiry_date = $expiryDate;

        return $this;
    }

    /**
     * Get expiryDate
     *
     * @return \DateTime
     */
    public function getExpiryDate()
    {
        return $this->expiry_date;
    }

    /**
     * Set authorName
     *
     * @param string $authorName
     *
     * @return Person
     */
    public function setAuthorName($authorName)
    {
        $this->author_name = $authorName;

        return $this;
    }

    /**
     * Get authorName
     *
     * @return string
     */
    public function getAuthorName()
    {
        return $this->author_name;
    }

    /**
     * Set authorEmail
     *
     * @param string $authorEmail
     *
     * @return Person
     */
    public function setAuthorEmail($authorEmail)
    {
        $this->author_email = $authorEmail;

        return $this;
    }

    /**
     * Get authorEmail
     *
     * @return string
     */
    public function getAuthorEmail()
    {
        return $this->author_email;
    }

    /**
     * Set authorPhone
     *
     * @param string $authorPhone
     *
     * @return Person
     */
    public function setAuthorPhone($authorPhone)
    {
        $this->author_phone = $authorPhone;

        return $this;
    }

    /**
     * Get authorPhone
     *
     * @return string
     */
    public function getAuthorPhone()
    {
        return $this->author_phone;
    }

    /**
     * Set sourceName
     *
     * @param string $sourceName
     *
     * @return Person
     */
    public function setSourceName($sourceName)
    {
        $this->source_name = $sourceName;

        return $this;
    }

    /**
     * Get sourceName
     *
     * @return string
     */
    public function getSourceName()
    {
        return $this->source_name;
    }

    /**
     * Set sourceDate
     *
     * @param \DateTime $sourceDate
     *
     * @return Person
     */
    public function setSourceDate($sourceDate)
    {
        $this->source_date = $sourceDate;

        return $this;
    }

    /**
     * Get sourceDate
     *
     * @return \DateTime
     */
    public function getSourceDate()
    {
        return $this->source_date;
    }

    /**
     * Set sourceUrl
     *
     * @param string $sourceUrl
     *
     * @return Person
     */
    public function setSourceUrl($sourceUrl)
    {
        $this->source_url = $sourceUrl;

        return $this;
    }

    /**
     * Get sourceUrl
     *
     * @return string
     */
    public function getSourceUrl()
    {
        return $this->source_url;
    }

    /**
     * Set fullName
     *
     * @param string $fullName
     *
     * @return Person
     */
    public function setFullName($fullName)
    {
        $this->full_name = $fullName;

        return $this;
    }

    /**
     * Get fullName
     *
     * @return string
     */
    public function getFullName()
    {
        return $this->full_name;
    }

    /**
     * Set givenName
     *
     * @param string $givenName
     *
     * @return Person
     */
    public function setGivenName($givenName)
    {
        $this->given_name = $givenName;

        return $this;
    }

    /**
     * Get givenName
     *
     * @return string
     */
    public function getGivenName()
    {
        return $this->given_name;
    }

    /**
     * Set familyName
     *
     * @param string $familyName
     *
     * @return Person
     */
    public function setFamilyName($familyName)
    {
        $this->family_name = $familyName;

        return $this;
    }

    /**
     * Get familyName
     *
     * @return string
     */
    public function getFamilyName()
    {
        return $this->family_name;
    }

    /**
     * Set alternateNames
     *
     * @param string $alternateNames
     *
     * @return Person
     */
    public function setAlternateNames($alternateNames)
    {
        $this->alternate_names = $alternateNames;

        return $this;
    }

    /**
     * Get alternateNames
     *
     * @return string
     */
    public function getAlternateNames()
    {
        return $this->alternate_names;
    }

    /**
     * Set description
     *
     * @param string $description
     *
     * @return Person
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set sex
     *
     * @param string $sex
     *
     * @return Person
     */
    public function setSex($sex)
    {
        $this->sex = $sex;

        return $this;
    }

    /**
     * Get sex
     *
     * @return string
     */
    public function getSex()
    {
        return $this->sex;
    }

    /**
     * Set dateOfBirth
     *
     * @param \DateTime $dateOfBirth
     *
     * @return Person
     */
    public function setDateOfBirth($dateOfBirth)
    {
        $this->date_of_birth = $dateOfBirth;

        return $this;
    }

    /**
     * Get dateOfBirth
     *
     * @return \DateTime
     */
    public function getDateOfBirth()
    {
        return $this->date_of_birth;
    }

    /**
     * Set age
     *
     * @param integer $age
     *
     * @return Person
     */
    public function setAge($age)
    {
        $this->age = $age;

        return $this;
    }

    /**
     * Get age
     *
     * @return integer
     */
    public function getAge()
    {
        return $this->age;
    }

    /**
     * Set homeStreet
     *
     * @param string $homeStreet
     *
     * @return Person
     */
    public function setHomeStreet($homeStreet)
    {
        $this->home_street = $homeStreet;

        return $this;
    }

    /**
     * Get homeStreet
     *
     * @return string
     */
    public function getHomeStreet()
    {
        return $this->home_street;
    }

    /**
     * Set homeNeighborhood
     *
     * @param string $homeNeighborhood
     *
     * @return Person
     */
    public function setHomeNeighborhood($homeNeighborhood)
    {
        $this->home_neighborhood = $homeNeighborhood;

        return $this;
    }

    /**
     * Get homeNeighborhood
     *
     * @return string
     */
    public function getHomeNeighborhood()
    {
        return $this->home_neighborhood;
    }

    /**
     * Set homeCity
     *
     * @param string $homeCity
     *
     * @return Person
     */
    public function setHomeCity($homeCity)
    {
        $this->home_city = $homeCity;

        return $this;
    }

    /**
     * Get homeCity
     *
     * @return string
     */
    public function getHomeCity()
    {
        return $this->home_city;
    }

    /**
     * Set homeState
     *
     * @param string $homeState
     *
     * @return Person
     */
    public function setHomeState($homeState)
    {
        $this->home_state = $homeState;

        return $this;
    }

    /**
     * Get homeState
     *
     * @return string
     */
    public function getHomeState()
    {
        return $this->home_state;
    }

    /**
     * Set homePostalCode
     *
     * @param string $homePostalCode
     *
     * @return Person
     */
    public function setHomePostalCode($homePostalCode)
    {
        $this->home_postal_code = $homePostalCode;

        return $this;
    }

    /**
     * Get homePostalCode
     *
     * @return string
     */
    public function getHomePostalCode()
    {
        return $this->home_postal_code;
    }

    /**
     * Set homeCountry
     *
     * @param string $homeCountry
     *
     * @return Person
     */
    public function setHomeCountry($homeCountry)
    {
        $this->home_country = $homeCountry;

        return $this;
    }

    /**
     * Get homeCountry
     *
     * @return string
     */
    public function getHomeCountry()
    {
        return $this->home_country;
    }

    /**
     * Set photoUrl
     *
     * @param string $photoUrl
     *
     * @return Person
     */
    public function setPhotoUrl($photoUrl)
    {
        $this->photo_url = $photoUrl;

        return $this;
    }

    /**
     * Get photoUrl
     *
     * @return string
     */
    public function getPhotoUrl()
    {
        return $this->photo_url;
    }

    /**
     * Set profileUrls
     *
     * @param string $profileUrls
     *
     * @return Person
     */
    public function setProfileUrls($profileUrls)
    {
        $this->profile_urls = $profileUrls;

        return $this;
    }

    /**
     * Get profileUrls
     *
     * @return string
     */
    public function getProfileUrls()
    {
        return $this->profile_urls;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->person_records = new \Doctrine\Common\Collections\ArrayCollection();
        $this->linked_person_records = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add personRecord
     *
     * @param \AppBundle\Entity\Note $personRecord
     *
     * @return Person
     */
    public function addPersonRecord(\AppBundle\Entity\Note $personRecord)
    {
        $this->person_records[] = $personRecord;

        return $this;
    }

    /**
     * Remove personRecord
     *
     * @param \AppBundle\Entity\Note $personRecord
     */
    public function removePersonRecord(\AppBundle\Entity\Note $personRecord)
    {
        $this->person_records->removeElement($personRecord);
    }

    /**
     * Get personRecords
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPersonRecords()
    {
        return $this->person_records;
    }

    /**
     * Add linkedPersonRecord
     *
     * @param \AppBundle\Entity\Note $linkedPersonRecord
     *
     * @return Person
     */
    public function addLinkedPersonRecord(\AppBundle\Entity\Note $linkedPersonRecord)
    {
        $this->linked_person_records[] = $linkedPersonRecord;

        return $this;
    }

    /**
     * Remove linkedPersonRecord
     *
     * @param \AppBundle\Entity\Note $linkedPersonRecord
     */
    public function removeLinkedPersonRecord(\AppBundle\Entity\Note $linkedPersonRecord)
    {
        $this->linked_person_records->removeElement($linkedPersonRecord);
    }

    /**
     * Get linkedPersonRecords
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getLinkedPersonRecords()
    {
        return $this->linked_person_records;
    }
}
